package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ElderlyReferralMapper;
import com.ruoyi.system.domain.ElderlyReferral;
import com.ruoyi.system.service.IElderlyReferralService;

/**
 * 老人送诊
Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-08-03
 */
@Service
public class ElderlyReferralServiceImpl implements IElderlyReferralService 
{
    @Autowired
    private ElderlyReferralMapper elderlyReferralMapper;

    /**
     * 查询老人送诊

     * 
     * @param erId 老人送诊
ID
     * @return 老人送诊

     */
    @Override
    public ElderlyReferral selectElderlyReferralById(Long erId)
    {
        return elderlyReferralMapper.selectElderlyReferralById(erId);
    }

    /**
     * 查询老人送诊
列表
     * 
     * @param elderlyReferral 老人送诊

     * @return 老人送诊

     */
    @Override
    public List<ElderlyReferral> selectElderlyReferralList(ElderlyReferral elderlyReferral)
    {
        return elderlyReferralMapper.selectElderlyReferralList(elderlyReferral);
    }

    /**
     * 新增老人送诊

     * 
     * @param elderlyReferral 老人送诊

     * @return 结果
     */
    @Override
    public int insertElderlyReferral(ElderlyReferral elderlyReferral)
    {
        return elderlyReferralMapper.insertElderlyReferral(elderlyReferral);
    }

    /**
     * 修改老人送诊

     * 
     * @param elderlyReferral 老人送诊

     * @return 结果
     */
    @Override
    public int updateElderlyReferral(ElderlyReferral elderlyReferral)
    {
        return elderlyReferralMapper.updateElderlyReferral(elderlyReferral);
    }

    /**
     * 批量删除老人送诊

     * 
     * @param erIds 需要删除的老人送诊
ID
     * @return 结果
     */
    @Override
    public int deleteElderlyReferralByIds(Long[] erIds)
    {
        return elderlyReferralMapper.deleteElderlyReferralByIds(erIds);
    }

    /**
     * 删除老人送诊信息
     * 
     * @param erId 老人送诊ID
     * @return 结果
     */
    @Override
    public int deleteElderlyReferralById(Long erId)
    {
        return elderlyReferralMapper.deleteElderlyReferralById(erId);
    }
}
